package application;

import java.util.Collection;
import java.util.Iterator;

import signal.Signal;
import synapses.SynapseInterface;

public class InputDispatcher {

	private Collection<SynapseInterface> inSynapses;

	public InputDispatcher(Collection<SynapseInterface> inSynapses) {
		this.inSynapses = inSynapses;
	}

	public void dispatch(Input input) {
		Iterator<SynapseInterface> it = inSynapses.iterator();
		for (Double d : input.getValues()) {
			it.next().transmit(new Signal(d));
		}
	}
}
